﻿using System.Collections.Generic;

namespace com.binance.client.model.enums
{
	 

	/// <summary>
	/// buy, sell.
	/// </summary>
	public sealed class TradeDirection
	{
	  public static readonly TradeDirection BUY = new TradeDirection("BUY", InnerEnum.BUY, "buy");
	  public static readonly TradeDirection SELL = new TradeDirection("SELL", InnerEnum.SELL, "sell");

	  private static readonly IList<TradeDirection> valueList = new List<TradeDirection>();

	  static TradeDirection()
	  {
		  valueList.Add(BUY);
		  valueList.Add(SELL);
	  }

	  public enum InnerEnum
	  {
		  BUY,
		  SELL
	  }

	  public readonly InnerEnum innerEnumValue;
	  private readonly string nameValue;
	  private readonly int ordinalValue;
	  private static int nextOrdinal = 0;

	  private readonly string code;

	  internal TradeDirection(string name, InnerEnum innerEnum, string side)
	  {
		this.code = side;

		  nameValue = name;
		  ordinalValue = nextOrdinal++;
		  innerEnumValue = innerEnum;
	  }

	  public override string ToString()
	  {
		return code;
	  }

//JAVA TO C# CONVERTER NOTE: Fields cannot have the same name as methods:EnumLookup

		public static IList<TradeDirection> values()
		{
			return valueList;
		}

		public int ordinal()
		{
			return ordinalValue;
		}

		public static TradeDirection valueOf(string name)
		{
			foreach (TradeDirection enumInstance in TradeDirection.valueList)
			{
				if (enumInstance.nameValue == name)
				{
					return enumInstance;
				}
			}
			throw new System.ArgumentException(name);
		}
	}

}